<?php
$strCookieKey	= 'offcmt' . $intOfflineId;
$intPage		= isset($_COOKIE[$strCookieKey]) ? $_COOKIE[$strCookieKey] : $objRequest->getParam('page',1);
$intLimit		= COMMENT_LIMIT;
$intOff			= (($intPage-1) * $intLimit);
$intTotal		= 0;
$strUrl			= HOST_VFRIEND . 'comment/offline?offlineid=' . $intOfflineId . '&';
$intTotal	 	= $objOffline->getCmtTotal($intOfflineId);
if($intTotal > $intLimit && !isset($_COOKIE[$strCookieKey])) {
	$intPage 	= ceil($intTotal/$intLimit);
	$intOff 	= ($intPage - 1) * $intLimit;	
}
if($intOff >= $intTotal && $intOff) $intOff = $intTotal - $intLimit;
$arrComment		= $objOffline->getCmt($intOfflineId, $intOff, $intLimit);
$this->view->arrComment		= $arrComment;
$this->view->intTotal		= $intTotal;
$this->view->intOffset		= $intOff;
$this->view->intLimit		= $intLimit;
$this->view->intPage		= $intPage;
$this->view->strUrl			= $strUrl;
$this->view->intOfflineId	= $intOfflineId;
?>